package com.hainan.bike.published.dao;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.hainan.bike.common.db.DBObject;
import com.hainan.bike.common.db.DbUtil;
import com.hainan.bike.factory.DBFactory;



public class PublishedDAO {
	
	public String findByPk() {
		String bsdf = "";
		DBFactory dbFactory = new DBFactory();
		DBObject db = null;
		ResultSet rs = null;
		PreparedStatement ps = null;
		try {
			
			db = dbFactory.getDBObjectW();

			String sql = " SELECT * FROM article_info  where article_id = 12312 ";
			
			ps = db.getPreparedStatement(sql.toString());
			rs = ps.executeQuery();
			if (rs != null && rs.next()) {
					bsdf = rs.getString("article_title");
			}
		} catch (Exception e) {
			
		} finally {
			DbUtil.closeRs(rs);
			DbUtil.closeStmt(ps);
			try {
				db.close();
			} catch (SQLException sqle) {
				
			}
		}
		return bsdf;
	}
}
